Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext

RE: detaching an uploaded file on server with JAVA...
~Nicole Fezwesonnivu 29.Dec.03 08:25 PM a Web browser
Domino Web Access All Releases All Platforms


1) Document must be saved before you can find attachmnets.
2) Attachments saved from Web browser are not in richtext field, they are directly in document. Use EmbeddedObject obj=doc.getAttachment("file.zip") to set handle to attachment.
3) On client if you do not specify path, files get saved to c:\notes6client\ folder, on server they most probably get saved to c:\domino6server\Domino\ folder, I could not test this today.


import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
Database db = agentContext.getCurrentDatabase();
Document doc = db.getDocumentByUNID("C9030AAD883E062CC1256E0B0858FED6");
EmbeddedObject obj = doc.getAttachment("bubbles-evil.mp3");
if (obj != null) {
obj.extractFile(obj.getSource());
System.out.println("Extracting "+obj.getSource());
}
} catch(Exception e) {
e.printStackTrace();
}
}
}




detaching an uploaded file on serve... (~Joan Froweplop... 27.Dec.03)
. . RE: detaching an uploaded file on s... (~Nicole Fezweso... 29.Dec.03)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS